﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Microsoft.Windows.Controls.Ribbon;
using System.Globalization;
using System.Data;
using LoghogInterface.Views;

namespace LoghogInterface
{
    public partial class MainWindow : RibbonWindow
    {
        public ColumnsIndex Ind = new ColumnsIndex();

        public MainWindow()
        {
            try
            {
                InitializeComponent();
                Ind.SetDefault();

                LoghogInterface.ViewModels.ViewModelMainWindow viewModel = new ViewModels.ViewModelMainWindow();
                base.DataContext = viewModel;

                WindowInput input = new WindowInput();
                input.DataContext = viewModel.input;
                input.ShowDialog();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Ошибка работа программы");
            }
        }

        private void RibbonButton_Click(object sender, RoutedEventArgs e)
        {
            
            ColumnsDispleyIndex ColumnsWin = new ColumnsDispleyIndex();
            ColumnsWin.SetParent(this);
            ColumnsWin.Show();
        }

        private void CloseWindow(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }

   
}
